package com.dorso.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = false)
public class Product implements Serializable {

    private static final long serialVersionUID=1L;
    @TableId(value="id",type= IdType.AUTO)//设置id字段为自增长
    private Long id;
    private String name;
    private double price;
    private int num;//产品数量
    @TableField(exist = false)
    private List<Supplier>supplierList=new ArrayList<>();
}
